package com.huidao.service;

import java.util.List;

import com.huidao.entity.Order;

public interface OrderService {
	/**
	 * 
	 * @param order
	 * @return 0:库存不足;1:添加成功;2:添加失败;
	 * 			3:数据库连接异常;4:购物车删除失败
	 */
	public int addOrder(Order order,String sid);
	
	
	public boolean addOrderAll(long userId);
	
	public List<Order> getOrderListByBuyer(int currentPage,long userId);
	
	public int getTotalPageByBuyer(long userId);
	
	public boolean updateOrderState(String id,String state);
	
	public List<Order> getOrderListBySeller(int currentPage,long userId);
	
	public int getTotalPageBySeller(long userId);
}
